﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Media;

namespace theguineasyndrome.levels
{
    public class PortalLevel : LevelLoader
    {
        public ObstacleElement door1;
        public ObstacleElement door2;
        public ObstacleElement door3;

        public PortalLevel(GameMode gameMode, ContentManager content, WaterWeapon waterWeapon, FireWeapon fireWeapon, PortalWeapon portalWeapon, PaintWeapon paintWeapon)
            : base(gameMode, content, waterWeapon, fireWeapon, portalWeapon, paintWeapon)
        {

        }

        public override Level load()
        {
            level = getLevel("levels/levelportal");

            // turrets
            Texture2D turretTexture = content.Load<Texture2D>("images/enemies/turret");
            for (int i = 1; i <= 6; i++)
                level.addElement(new Turret(level, turretTexture, level.getPointMarkPosition("enemyPortal " + i)));

            // bees
            Texture2D beeTexture = content.Load<Texture2D>("images/enemies/bee");
            Texture2D beeRopeTexture = content.Load<Texture2D>("images/enemies/beerope");
            for (int i = 1; i <= 2; i++)
                level.addElement(new Bee(level, beeTexture, beeRopeTexture, level.getPointMarkPosition("enemyBee " + i)));

            // goomba
            Texture2D goombaTexture = content.Load<Texture2D>("images/enemies/goomba");
            level.addElement(new Goomba(level, goombaTexture, level.getPointMarkPosition("enemyMushroom 1")));

            // turtles
            Texture2D turtleTexture = content.Load<Texture2D>("images/enemies/turtle");
            for (int i = 1; i <= 2; i++)
                level.addElement(new Turtle(level, turtleTexture, level.getPointMarkPosition("enemyTortue " + i)));

            // knight
            Texture2D knightTexture = content.Load<Texture2D>("images/enemies/knight");
            level.addElement(new Knight(level, knightTexture, level.getPointMarkPosition("enemyKnight 1")));

            addCarots(level);

            Song song = content.Load<Song>("music/Peanuts groove");
            MediaPlayer.Stop();
            MediaPlayer.IsRepeating = true;
            MediaPlayer.Play(song);

            return level;
        }

    }
}
